package com.iris.live.services.data.repositories;

import com.iris.live.services.data.models.Lsh导入名单联系表Model;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by sxy on 2016/7/13.
 */
@Transactional
public interface Lsh导入名单联系表Repository extends JpaRepository<Lsh导入名单联系表Model, Integer>, JpaSpecificationExecutor<Lsh导入名单联系表Model> {

    @Query("select a from Lsh导入名单联系表Model a where a.导入编号=?1 and a.许可=?2")
    Lsh导入名单联系表Model findByImportIdAndPermit(Integer importId, String permit);

    @Query("select a from Lsh导入名单联系表Model a where a.许可 = ?1")
    List<Lsh导入名单联系表Model> findAllConMoByDlr(String dlr);
}
